//
//  VersionTool.m
//  BSBDJ
//
//  Created by user on 16/5/23.
//  Copyright © 2016年 Burning. All rights reserved.
//

#import "VersionTool.h"
#import "TZSaveTool.h"

@implementation VersionTool

+ (BOOL)compareCurrentVersionAndSystemVersion
{

    NSString *currentVersion = [TZSaveTool tz_ObjectForKey:TZVersion];
    
    NSString *systemVersion = [NSBundle mainBundle].infoDictionary[@"CFBundleShortVersionString"];
    NSLog(@"%@--%@",currentVersion,systemVersion);
    
    //版本相等->不是第一次打开
    if ([currentVersion isEqualToString:systemVersion]){
        return NO;
    }else{
        //版本不等->是第一次打开 保存版本
        [TZSaveTool tz_SetObject:systemVersion forKey:TZVersion];
        return YES;
    }
    
}

@end
